#!/bin/sh

[ -f /etc/sysconfig/kvm ] && . /etc/sysconfig/kvm

switch=${SWITCH:-"sw0"}

[ -f /etc/SuSE-release ] && BRCTL=/sbin/brctl || BRCTL=/usr/sbin/brctl
/usr/bin/sudo /sbin/ip link set dev $1 up
/usr/bin/sudo $BRCTL addif ${switch} $1
